#include("/manage/_common/_layout.html")
#@layout()

### ********************************* 定义页面标题
#define title()
文章分类列表
#end

### ********************************* css导入
#define import_css()
#end

### ********************************* js导入
#define import_js()
#end

### ********************************* Body内容区开始
#define main()
<div class="layui-card" style="margin-bottom:0px">
	<div class="layui-form layui-card-header" style="padding-top: 10px; padding-bottom: 10px; height: auto;">
		<div class="layui-inline">
			<label class="layui-form-label">商品标题：</label>
			<div class="layui-input-inline">
				<input id="title" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-inline">
			<label class="layui-form-label">商品分类：</label>
			<div class="layui-input-inline">
				<select id="goodsCategory">
					<option value="">-- 请选择 --</option>
					#for(goodsCategory : goodsCategoryList)
					<option value="#(goodsCategory.id)">#(goodsCategory.name)</option>
					#end
				</select>
			</div>
		</div>

		<div class="layui-inline">
			<label class="layui-form-label">状态：</label>
			<div class="layui-input-inline">
				<select id="status">
					<option value="">-- 请选择 --</option>
					<option value="on">启用</option>
					<option value="off">禁用</option>
				</select>
			</div>
		</div>

		<button class="layui-btn" lay-submit="" data-type="reload" lay-filter="LAY-search">
			<i class="layui-icon layui-icon-search"></i>
		</button>
	</div>


	<div class="layui-card-body">
		<div>
			<button class="layui-btn layui-btn-sm" data-type="add"><i class="layui-icon layui-icon-add-circle"></i> 添加</button>
		</div>

		<table class="layui-table"
			lay-data="{height: 'full-166', cellMinWidth: 60,url:'#(ctx)/manage/goods/ajaxSearch', page:true, id:'LAY-main-table-ID'}"
			lay-filter="LAY-main-table">
			<thead>
				<tr>
					<th lay-data="{field:'id', width:60, align:'center', sort: true, fixed: true}">ID</th>
					<th lay-data="{width:80, fixed: true, templet:'#logoTpl'}">Logo</th>
					<th lay-data="{field:'title', width:200, sort: true, fixed: true}">商品标题</th>
					<th lay-data="{field:'categoryName', width:160, sort: true}">分类</th>
					<th lay-data="{field:'status', width:80, sort: true, templet:'#statusTpl'}">状态</th>
					<th lay-data="{field:'label', width:200, sort: true}">标签</th>
					<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#LAY-main-table-action'}">操作</th>
				</tr>
			</thead>
		</table>

		<script type="text/html" id="LAY-main-table-action" >
			<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
			<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
			<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="preview">预览</a>
		</script>
	</div>
	<!-- 排序切换数据 -->
	<input type="hidden" id="sortField">
	<input type="hidden" id="sortType">
</div>

<!-- 数据表格单元格模板区域 -->
<script type="text/html" id="logoTpl">
#[[
	{{# if(d.thumbImg != null){ }}
		<img onclick="imgReview(this);" src="{{ d.thumbImg }}" style="max-height: 28px; max-width: 48px">
	{{#  } else { }}
		LOGO
	{{#  } }}
]]#
</script>

<script type="text/html" id="statusTpl">
#[[
	{{# if(d.status === 'off'){ }}
		<span style="color: #F581B1;">禁用</span>
	{{#  } else { }}
		启用
	{{#  } }}
]]#
</script>

#end
### ********************************* Body内容区结束


### ********************************* 脚本区开始
#define script()
#include("_index_script.html")
#end
### ********************************* JS脚本区结束
